// part1:C14:ex14.5.cpp
// class Date.
#include <iostream>
using namespace std;

class Date
{
public:
    Date(){}
    Date(int y, int m, int d) 
    {
        year = y;
        month = m;
        day = d;
    }
    friend ostream& operator<<(ostream &os, const Date &dt);
private:
    int year, month, day;
};

friend ostream& operator<<(ostream &os, const Date &dt)
{
    const char sep = '\t';
    os << "year:" << d.year << sep << "month:" << d.month << sep << "day:"
        << d.day << endl;
    return os;
}

